#ifndef _READBAUMERMEX_H_
#define _READBAUMERMEX_H_

//#include <stdlib.h>
//#include <stdio.h>
//#include <conio.h>
#include "bgapi.hpp"
//#include <iostream>
//#include <vector>
#include "cv.h"
#include "highgui.h"
//#include <windows.h>

#include "mex.h"

#include "global.h"

#include "myCriticalSection.h"
#include "myCamera.h"

#include "ReadBaumerConfig.h"

mxArray* convertCv2Matlab(cv::Mat &image);
int init(std::vector<int> exposurevalue, float framerate, char* imageformat);
int getImage(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]);
int restart(void);
int release(void);

void mexExitFunction(void);
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]);


BGAPI_RESULT BGAPI_CALLBACK imageCallback( void * callBackOwner, BGAPI::Image* pImage  );
BOOL IsWow64(void);
BGAPI_RESULT initialiseSystem(BGAPI::System* &pSystem, int &system_count);
BGAPI_RESULT initialiseCamera(BGAPI::System* &pSystem, std::vector<BGAPI::Camera*> &pCamera, int &camera_count, std::vector<BGAPIX_CameraInfo> &cameradeviceinfo);
BGAPI_RESULT initialiseCamera(BGAPI::System* &pSystem, std::vector<BGAPI::Camera*> &pCamera, int &camera_count, std::vector<BGAPIX_CameraInfo> &cameradeviceinfo, std::vector<int> exposurevalue, float framerate, char* imageformat);




#endif /* _READBAUMERMEX_H */